#ifndef __BSP_MSGPORT_CORE__
#define __BSP_MSGPORT_CORE__

#include "stdint.h"
#include "ring_buff.h"


typedef struct _msg_port_t
{
	uint8_t 				State;
	ringBuffPort_t			MsgTX_RingBuff;
	ringBuffPort_t			MsgRX_RingBuff;
	uint8_t 				(*check_send_state)(struct _msg_port_t *msg_port);
	void 					(*uart_write)(struct _msg_port_t *msg_port, uint8_t *str, uint16_t size);
	struct _msg_port_t		*next_MsgPort;
	uint8_t					msg_buff[MSG_PORT_SIZE];
}msg_port_t;


typedef enum
{
	UART_PORT_ERR = 0,
	UART_PORT_OK,
}UART_PORT_TYPE;

typedef enum
{
	UART_PORT_READY = 0,
	UART_PORT_BUSY ,	
}UART_PORT_STATE;

typedef enum
{
	LOG_COMMON = 0,
	LOG_WARNING,
	LOG_ERR,
	LOG_IMPORTANT,
}LOG_LEVEL;

extern char *ascii_control[];

#endif
